﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using Sgml;

namespace DllSync.Providers
{
    public class HtmlProvider
    {
		public bool CanRead(Stream steam)
		{
			try
			{
				using (var reader = new SgmlReader())
				using (var sr = new StreamReader(steam))
				{
					reader.InputStream = sr;
					return reader.MoveToContent() == XmlNodeType.Element &&
						reader.LocalName == "html";
				}
			}
			catch (Exception)
			{
			}

			return false;
		}

		public IEnumerable<UpdateEntry> ReadUpdates(Stream stream)
		{
			yield break;
		}
    }
}
